﻿<Window x:Class="TestProject.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="382" Width="877">
    <Grid Height="344" Width="840">
        <DataGrid AutoGenerateColumns="False" Height="271" HorizontalAlignment="Left" Margin="12,22,0,0" Name="dgDemons" VerticalAlignment="Top" Width="210" ItemsSource="{Binding}" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Level" IsReadOnly="True" Binding="{Binding Path=Level}"/>
                <DataGridTextColumn Header="Race" IsReadOnly="True" Binding="{Binding Path=RaceJ}"/>
                <DataGridTextColumn Header="Name" IsReadOnly="True" Binding="{Binding Path=Name}"/>
            </DataGrid.Columns>
            <DataGrid.RowStyle>
                <Style>
                    <EventSetter Event="DataGrid.MouseDoubleClick" Handler="dgDemons_MouseDoubleClick"></EventSetter>
                </Style>
            </DataGrid.RowStyle>
        </DataGrid>
        <Button Content="Unite" Height="29" HorizontalAlignment="Left" Margin="228,55,0,0" Name="bUnite" VerticalAlignment="Top" Width="84" Click="bUnite_Click" />
        <DataGrid AutoGenerateColumns="False" Height="271" HorizontalAlignment="Left" Margin="459,22,0,0" Name="dgResults" VerticalAlignment="Top" Width="369" CanUserAddRows="False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Demon1" IsReadOnly="True" Binding="{Binding Path=Demon1}" SortMemberPath="Demon1.Level"/>
                <DataGridTextColumn Header="" IsReadOnly="True" CanUserSort="False" Binding="{Binding Path=Plus}" SortMemberPath="Demon1.Race"/>
                <DataGridTextColumn Header="Demon2" IsReadOnly="True" Binding="{Binding Path=Demon2}" SortMemberPath="Demon2.Level"/>
                <DataGridTextColumn Header="" IsReadOnly="True"  CanUserSort="False" Binding="{Binding Path=Plus2}" SortMemberPath="Demon2.Race"/>
                <DataGridTextColumn Header="Demon3" IsReadOnly="True" Binding="{Binding Path=Demon3}" SortMemberPath="Demon3.Level"/>
                <DataGridTextColumn Header="" IsReadOnly="True"  CanUserSort="False" Binding="{Binding Path=Equal}" SortMemberPath="Demon3.Race"/>
                <DataGridTextColumn Header="Result" IsReadOnly="True" Binding="{Binding Path=Result}" SortMemberPath="Result.Level"/>
            </DataGrid.Columns>
            <DataGrid.RowStyle>
                <Style>
                    <EventSetter Event="DataGrid.MouseDoubleClick" Handler="dgResults_MouseDoubleClick"></EventSetter>
                </Style>
            </DataGrid.RowStyle>
        </DataGrid>
        <DataGrid AutoGenerateColumns="False" Height="271" HorizontalAlignment="Left" Margin="318,22,0,0" Name="dgResult" VerticalAlignment="Top" Width="135" SelectionMode="Single">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Result" IsReadOnly="True" Binding="{Binding}" SortMemberPath="Level"/>
            </DataGrid.Columns>
            <DataGrid.RowStyle>
                <Style>
                    <EventSetter Event="DataGrid.MouseDoubleClick" Handler="dgResult_MouseDoubleClick"></EventSetter>
                </Style>
            </DataGrid.RowStyle>
        </DataGrid>
        <Button Content="Ununite" Height="23" HorizontalAlignment="Left" Margin="228,90,0,0" Name="bUnunite" VerticalAlignment="Top" Width="84" Click="bUnunite_Click" />
    </Grid>
</Window>
